<?php
/**
 * Class of questions and answers thereto
 */
class Question
{
	private $text = null;
	private $id = null;
	private $type = null;
	private $answer = array();
	
	public function setText($text)
	{ 
    	$this->text = $text;
    } 
    
	public function getText() 
	{ 
		return $this->text;
	}
	
	public function setId($id) 
	{ 
    	$this->id = $id;
    }
    
	public function getId() 
	{ 
		return $this->id;
	}
	
    public function setType($type) 
    { 
    	$this->type = $type;   
 	}
 	
	public function getType() 
	{ 
		return $this->type;
	} 
	
	public function addAnswer(Answer $answer) 
	{ 
    	$this->answer[] = $answer;   
    }
     
  	public function getAnswers() 
  	{ 
		return $this->answer;
	}
	
	public function delAnswer() 
	{ 
    	unset($this->answer);   
    }
}